package com.ashen.study.aop;

/**
 * @author hxl
 * @Classname CurrentUserHolder
 * @Description
 * @Date 2019/9/6 13:49
 */
public class CurrentUserHolder {
    private static final ThreadLocal<String> HOLDER = new ThreadLocal<>();

    public static String get() {
        return HOLDER.get() == null ? "unknown" : HOLDER.get();
    }

    public static void set(String user) {
        HOLDER.set(user);
    }


}
